<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>AddCommissioner.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

    <script type="text/javascript">
    
    function checkblank(f)
{
   a=f.cid.value
   b=f.cnm.value
   c=f.chq.value
   d=f.ed.value
    
    if((a.length==0) || (b.length==0) || (c.length==0)||(d.length==0))
   {
      alert("pls fill all d fields")
      if(a.length==0)
      {
         document.getElementById("lcid").innerHTML="<font color=green>Enter Commissioner's id</font>"
      }
      if(b.length==0)
      {
         document.getElementById("lcnm").innerHTML="<font color=green>Enter Commissioner's name </font>"
      }
      if(c.length==0)
      {
         document.getElementById("lchq").innerHTML="<font color=green>Enter Commissioner's headquarter </font>"
      }
      if(d.length==0)
      {
         document.getElementById("led").innerHTML="<font color=green>Enter effect date </font>"
      }
      return false;
    }
  }  
    
    </script>
    <script language="javascript" type="text/javascript" src="datetimepicker_css.js"></script>
    
   <link href="css/style1.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="main-out">
<div class="main">
<div class="page">
<div class="top">
<div class="header">
<div class="header-top">
<%@include file="TopHead.jsp" %>
</div>
<div class="topmenu">
<%@include file="TopMenu.jsp" %>
</div>
<div class="">
<img src="images/d3.gif">
</div>
</div>
<div class="content">
<div class="content-left">
<div class="row1">
<div class="img">&nbsp;</div>
<div class="welcome">
<h1 class="title">Welcome to POlice Seva<span></span></h1>
<p>




</p>


<html:form action="adcmsnrdtl" onsubmit="return checkblank(this)">
  
  <%Object ob=request.getAttribute("cmdtl");
   Object ob1=request.getAttribute("acid");
	if((ob!=null)&&(ob1!=null))
	{ %>
  
  <div align="center">
	<table border="0" width="90%" height="273">
		<tr>
			<td colspan="2" align="center"><font color="#6600CC"> <b><u>Add Commissionerate's Details</u></b></font>
		</tr>
		<tr>
			<td width="98%" colspan="2">&nbsp;</td>
		</tr>
		
		<tr>
			<td width="25%">Commissionerate ID</td>
			<td width="30%"><html:text property="cid" value="<%=ob1.toString() %>" readonly="true"></html:text> </td>
			<td><label id="lcid"></label> </td>
		</tr>
		<tr>
			<td width="25%">Commissionerate Name</td>
			<td width="30%"><html:text property="cnm" value=""></html:text> </td>
			<td><label id="lcnm"></label> </td>
		</tr>
		<tr>
			<td width="25%">Commissionerate Headquarter</td>
			<td width="30%"><html:text property="chq" value=""></html:text> </td>
			<td><label id="lchq"></label> </td>
		</tr>
		<tr>
			<td width="25%">Effect Date</td>
			<td width="76%">
<input type="text" name="T2" id="demo3" size="20" readonly="readonly" onfocus="javascript:NewCssCal('demo3','ddMMMyyyy','arrow')" value="">
</td>


			<td><label id="led"></label> </td>
		</tr>
		<tr>
			<td width="98%" colspan="2"></td>
		</tr>
		<tr>
			<td width="98%" align="center" colspan="2"><html:submit value="AddCommissioner" property="AdComisnr"></html:submit></td>
		</tr>
		<tr>
			<td width="98%" colspan="2"></td>
		</tr>
		<tr>
			<td width="98%" colspan="2"><a href="<%=request.getContextPath()%>/adcmsnrdtl.do?AdComisnr=viewcommissioner">VIEW/EDIT</a></td>
		</tr>
		
		<tr>
			<td width="30%"><%=ob.toString() %></td>
		</tr>
	</table>
	
</div>	
	<%
	} 
	
else
{ %>
<div align="center">
	<table border="0" width="90%" height="273">
		<tr>
			<td colspan="2" align="center"><font color="#6600CC"> <b><u>Add Commissionerate's Details</u></b></font>
		</tr>
		<tr>
			<td width="98%" colspan="2">&nbsp;</td>
		</tr>
		
		<tr>
			<td width="25%">Commissionerate ID</td>
			<td width="30%"><html:text property="cid" value="<%=ob1.toString() %>" readonly="true"></html:text> </td>
			<td><label id="lcid"></label> </td>
		</tr>
		<tr>
			<td width="25%">Commissionerate Name</td>
			<td width="30%"><html:text property="cnm"></html:text> </td>
			<td><label id="lcnm"></label> </td>
		</tr>
		<tr>
			<td width="25%">Commissionerate Headquarter</td>
			<td width="30%"><html:text property="chq"></html:text> </td>
			<td><label id="lchq"></label> </td>
		</tr>
		<tr>
			<td width="25%">Effect Date</td>
			<td width="76%">
<input type="text" name="T2" id="demo3" size="20" readonly="readonly" onfocus="javascript:NewCssCal('demo3','ddMMMyyyy','arrow')">
</td>
			<td><label id="led"></label> </td>
		</tr>
		<tr>
			<td width="98%" colspan="2"></td>
		</tr>
		<tr>
			<td width="98%" align="center" colspan="2"><html:submit value="AddCommissioner" property="AdComisnr"></html:submit></td>
		</tr>
		<tr>
			<td width="98%" colspan="2"></td>
		</tr>
		<tr>
			<td width="98%" colspan="2"><a href="<%=request.getContextPath()%>/adcmsnrdtl.do?AdComisnr=viewcommissioner">VIEW/EDIT</a></td>
		</tr>
	</table>
	
</div>
<%}
 %>  
 
 </html:form> 







</div>
</div>

</div>
<div class="content-right">
<%@include file="SideMenu.jsp" %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
<div class="bottom">
<!--DO NOT Remove The Footer Links-->
<p><%@include file="Footer.jsp"  %><br>
<!--DO NOT Remove The Footer Links-->
</p>
</div>
</div>
</div>
</div>
</body>
</html:html>

   